/*
 * @Description: 根模块
 * @Autor: 人生
 * @Date: 2020-09-27 14:44:47
 * @,@LastEditors: ,: 人生
 */
import {
    TOGGLE_MOBILE_TYPE,
    SIDEBAR_TYPE
} from './mutation-types'
export default {
    state: {
       // 是否手机模式
      isMobile: false,
      areaList:[],   //区域
    },
    mutations: {
        [SIDEBAR_TYPE]: (state, type) => {
            state.sideCollapsed = type
          },
        [TOGGLE_MOBILE_TYPE]: (state, isMobile) => {
            state.isMobile = isMobile
          },
        setAreaList:(state,areaList)=>{
            state.areaList = areaList
        }
    },
    actions: {
        
    },
    getters:{
        roles:state => state.user.roles,
        addRouters:state=> state.permission.addRouters,
        Userinfo:state=> state.user.Userinfo,
    }
}